package com.zxj.schoolxianyu.service;

import com.zxj.schoolxianyu.dao.commentsDao;
import com.zxj.schoolxianyu.entity.comments;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class addCommentService {
    @Autowired(required = false)
    private commentsDao commentsDao;

    public String addComment(comments c) {
        java.sql.Date currentDate = new java.sql.Date(System.currentTimeMillis());
        c.commentdate = currentDate;
        commentsDao.insert(c);
        return "success";
    }
}
